package com.platform.entity.shop;


import com.platform.utils.StringUtils;

import java.io.Serializable;
import java.math.BigDecimal;


/**
 * 类名称：UserRecord<br>
 * 类描述：<br>
 */
public class UserRecordEntity  implements Serializable{
	private static final long serialVersionUID = 1L;

	//reportId
	private Integer reportId;
	//分销用户ID
	private Long mlsUserId;
	//记录类型：1提现、2交易分成
	private Integer types;
	//记录类型内容
	private String typesStr;
	//金额单位分
	private Integer price;

	private Integer realPrice;//=实际提现金额= 发放金额 * 1.07
	private Integer realOut;//=实际发放金额(正常财务计算的) = 提现金额 / 1.07
	private Integer out;//=发放金额(给到财务公司的，也是给用户看的) = 提现金额 * （1 - 0.07)

	//备注
	private String remarks;
	private String userName;
	//创建时间
	private String ctime;
	private Integer page;
	private Integer size;
	private Integer offset;

	private BigDecimal amount;
	private Integer direction;

	private String bankCard;
	private String realName;
	private String idCard;

	private String mobile;

	private String reason;

	private String refund;

	/**
	 * 是否被驳回
	 * @return
	 */
	public String getRefund() {
		return StringUtils.isNotEmpty(reason) ? "是" : "否";
	}

	public void setRefund(String refund) {
		this.refund = refund;
	}

	public String getReason() {
		return reason;
	}

	public void setReason(String reason) {
		this.reason = reason;
	}

	public String getMobile() {
		return mobile;
	}

	public void setMobile(String mobile) {
		this.mobile = mobile;
	}

	private Long userId;

	public Long getUserId() {
		return userId;
	}

	public void setUserId(Long userId) {
		this.userId = userId;
	}

	public String getBankCard() {
		return bankCard;
	}

	public void setBankCard(String bankCard) {
		this.bankCard = bankCard;
	}

	public String getRealName() {
		return realName;
	}

	public void setRealName(String realName) {
		this.realName = realName;
	}

	public String getIdCard() {
		return idCard;
	}

	public void setIdCard(String idCard) {
		this.idCard = idCard;
	}

	public BigDecimal getAmount() {
		return amount;
	}

	public void setAmount(BigDecimal amount) {
		this.amount = amount;
	}

	public Integer getDirection() {
		return direction;
	}

	public void setDirection(Integer direction) {
		this.direction = direction;
	}

	public Integer getOffset() {
		return offset;
	}
	public void setOffset(Integer offset) {
		this.offset = offset;
	}
	public Integer getPage() {
		return page;
	}
	public void setPage(Integer page) {
		this.page = page;
	}
	public Integer getSize() {
		return size;
	}
	public void setSize(Integer size) {
		this.size = size;
	}
	/**
	 * 设置:reportId
	 */
	public void setReportId(Integer value) {
		this.reportId = value;
	}
	/**
	 * 获取:reportId
	 */
	public Integer getReportId() {
		return reportId;
	}

	/**
	 * 设置:分销用户ID
	 */
	public void setMlsUserId(Long value) {
		this.mlsUserId = value;
	}
	/**
	 * 获取:分销用户ID
	 */
	public Long getMlsUserId() {
		return mlsUserId;
	}

	/**
	 * 设置:记录类型：1提现、2交易分成
	 */
	public void setTypes(Integer value) {
		this.types = value;
	}
	/**
	 * 获取:记录类型：1提现、2交易分成
	 */
	public Integer getTypes() {
		return types;
	}

	/**
	 * 设置:记录类型内容
	 */
	public void setTypesStr(String value) {
		this.typesStr = value;
	}
	/**
	 * 获取:记录类型内容
	 */
	public String getTypesStr() {
		return typesStr;
	}

	/**
	 * 设置:金额单位分
	 */
	public void setPrice(Integer value) {
		this.price = value;
	}
	/**
	 * 获取:金额单位分
	 */
	public Integer getPrice() {
		return price;
	}

	/**
	 * 设置:备注
	 */
	public void setRemarks(String value) {
		this.remarks = value;
	}
	/**
	 * 获取:备注
	 */
	public String getRemarks() {
		return remarks;
	}

	/**
	 * 设置:创建时间
	 */
	public void setCtime(String value) {
		this.ctime = value;
	}
	/**
	 * 获取:创建时间
	 */
	public String getCtime() {
		return ctime;
	}

	public String getUserName() {
		return userName;
	}

	public void setUserName(String userName) {
		this.userName = userName;
	}

	public Integer getRealPrice() {
		return new BigDecimal(this.getOut()).multiply(new BigDecimal("1.07")).setScale(0,   BigDecimal.ROUND_HALF_UP).intValue();
	}

	public void setRealPrice(Integer realPrice) {
		this.realPrice = realPrice;
	}

	public Integer getRealOut() {
		return new BigDecimal(this.getPrice()).divide(new BigDecimal("1.07"), 0, BigDecimal.ROUND_HALF_UP).intValue();
	}

	public void setRealOut(Integer realOut) {
		this.realOut = realOut;
	}

	public Integer getOut() {
		return new BigDecimal(this.getPrice()).multiply(new BigDecimal("0.93")).setScale(0,   BigDecimal.ROUND_HALF_UP).intValue();
	}

	public void setOut(Integer out) {
		this.out = out;
	}
}
